Skip to content

Correction to suggested individual twig rendering of password and confirmation entries in 'repeated' component. #2855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

alexcoventry
Copy link
Contributor

The corrected lines worked for me, whereas the suggested lines led to
the error message 'Method "first" for object
"Symfony\Component\Form\FormView" does not exist'. (Same error message
described in this thread:
http://forum.symfony-project.org/viewtopic.php?f=23&t=36193.) I read
the "password" and "confirm" strings out of of the HTML generated by
symfony. I am not sure whether this is a bug in documentation, a bug in
the 'repeated' object, or the result of a misuse on my part.

the error message 'Method "first" for object
"Symfony\Component\Form\FormView" does not exist'.  (Same error message
described in this thread:
<http://forum.symfony-project.org/viewtopic.php?f=23&t=36193>.)  I read
the "password" and "confirm" strings out of of the HTML generated by
symfony.  I am not sure whether this is a bug in documentation, a bug in
the 'repeated' object, or the result of a misuse on my part.
@tommygnr
Copy link
Contributor

This is a misuse on your part, however the documentation could perhaps be clearer.
I think you are using

first_name => 'password',
second_name => 'confirm'

When you should be using

first_options => array(
    'label' => 'password',
),
second_options => array(
    'label' => 'confirm',
)

In almost all use cases for the repeated field there is no need to use the first_name & second_name options

@wouterj
Copy link
Member

wouterj commented Jul 25, 2013

@tommygnr could you please create an issue explaining what should be improved? Then we can close this one.

@alexcoventry bad that this wasn't a real bug! Hope to see other fixes from you in the furture.

@alexcoventry
Copy link
Contributor Author

@tommygnr No, you're right, the documentation is clear and I was confused. Sorry about that. But actually I was using first_options => 'password'. I mentioned {first,second}_name because those actually work for me.

@weaverryan
Copy link
Member

Hi guys!

I've made a change at sha: 4b5a44a to hopefully make this clearer. We actually already had a note, but since it was below the example, I'm not sure if people noticed it :).

Thanks!

@weaverryan weaverryan closed this Aug 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants